import { Component, OnInit ,ContentChild, AfterContentInit,ContentChildren,QueryList} from '@angular/core';
import {P2C1Component} from '../p2-c1/p2-c1.component'
@Component({
  selector: 'app-p2-c2',
  templateUrl: './p2-c2.component.html',
  styleUrls: ['./p2-c2.component.css']
})
export class P2C2Component implements OnInit {

    @ContentChild(P2C1Component) childCmp:P2C1Component;
    @ContentChildren(P2C1Component) childrenCmp:QueryList<P2C1Component>
    @ContentChild(HTMLElement)  ccmp:HTMLElement
    constructor() { }

    ngOnInit() {
    }

    ngAfterContentInit(){
        console.log(this.childCmp);
        console.log(this.childrenCmp)
    }

    ngAfterViewChecked(){
        console.log('ngAfterViewChecked p2c2')
    }

}
